package cn.com.zsw.gblog.modules.gblog.service.impl;

import cn.com.zsw.gblog.modules.gblog.mapper.GbFriendSiteMapper;
import cn.com.zsw.gblog.modules.gblog.entity.GbFriendSiteEntity;
import cn.com.zsw.gblog.modules.gblog.service.GbFriendSiteService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (gb_friend_site)表服务实现类
 *
 * @author shiwangzhou
 * @since 2020-06-24 16:24:56
 */
@Service("bFriendSiteService")
public class GbFriendSiteServiceImpl extends ServiceImpl<GbFriendSiteMapper, GbFriendSiteEntity> implements GbFriendSiteService {
    @Resource
    GbFriendSiteMapper friendSiteDao;

    /**
     * @Author: shiwangZhou
     * @Description: 获取友链列表。
     * @Date: 2020-06-24 16:30
     * @Return java.util.List<cn.com.zsw.gblog.modules.gblog.entity.GbFriendSiteEntity>
     * @Param
     */
    @Override
    public List<GbFriendSiteEntity> getFriendSiteList() {
        LambdaQueryWrapper<GbFriendSiteEntity> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(GbFriendSiteEntity::getStatus, 1);
        return friendSiteDao.selectList(wrapper);
    }
}